Skip to content

fix: address Copilot review findings on LinkedIn release publishing - #199

Merged
ineedjet merged 1 commit into
mainfrom
fix/linkedin-copilot-review
Sep 2, 2026
Merged

fix: address Copilot review findings on LinkedIn release publishing#199
ineedjet merged 1 commit into
mainfrom
fix/linkedin-copilot-review

Conversation

@ineedjet

@ineedjet ineedjet commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #194, addressing two findings from Copilot's review that were merged before being fixed:

  • truncate()/truncate_little_text() in prepare-linkedin-release-post/prepare.py could exceed the requested limit when limit <= 3 because they always appended .... Both now hard-cap without the ellipsis for very small limits.
  • The notify job in publish-linkedin-release-shared.yml ran whenever telegram-chat-id was set, even if telegram-bot-token was omitted, which fails at runtime since send-telegram-message requires the token. Since secrets isn't available in reusable-workflow if: conditions (job or step level, per actionlint), a check-token step now resolves presence via env:/run: into a step output that gates both notify steps.

Test plan

  • python3 -m pytest test/
  • hooks/actionlint.sh .github/workflows/publish-linkedin-release-shared.yml
  • yamllint -c config/yamllint.yml .github/workflows/publish-linkedin-release-shared.yml

- truncate() and truncate_little_text() could exceed the requested limit
  when limit <= 3, since they always appended "...". Both now hard-cap
  without the ellipsis for very small limits.
- The Telegram notify job in publish-linkedin-release-shared.yml ran
  whenever telegram-chat-id was set, even without telegram-bot-token,
  which failed at runtime. A check-token step now gates both notify
  steps on the secret actually being present.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ineedjet
ineedjet merged commit 12254ce into main Sep 2, 2026
6 checks passed
@ineedjet
ineedjet deleted the fix/linkedin-copilot-review branch September 2, 2026 21:39
@ineedjet ineedjet mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant